Skip to content

ci: Cluster GPU Tests shard 2 asks Darkbloom (bound the paged bench's MLX buffer cache) - #1987

Merged
davidtai merged 3 commits into
devfrom
ci/gpu-shards-sandbox
Nov 11, 2026
Merged

davidtai merged 3 commits into
devfrom
ci/gpu-shards-sandbox

Conversation

@davidtai

@davidtai davidtai commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Cluster GPU Tests shard 2 ran on Blacksmith without asking the route, because it peaked at 41 GiB used. Its largest process, paged-verify-bench, did not need that memory. The memory was MLX's freed-buffer cache.

  • Cause: CBv2PagedVerifyBench.verifyAndPrefillAttention attends random K/V of 4 layers at 30,720 tokens. That is 0.5 GiB of K/V. MLX's default cache limit is its memory limit (45.6 GiB on a 48 GiB Mac), and MLX reuses a freed buffer only for a request of about the same size. A prompt chunk's attention temporaries grow with the history, so the cache reuses none of them and keeps them all. The process reached 34.26 GiB.
  • Fix: the bench bounds the cache to a ready Qwen tensor-parallel rank's freed-buffer cache (QwenTensorParallelLaunch.freedBufferCacheBytes, 1 GiB) and restores the previous limit after the test. Each run now prints peak_active_gib and cache_gib. The test is unchanged otherwise. It asserted nothing before and asserts nothing now.
  • Routing: shard 2 now fits 4x24, like shards 1 and 3. It gets a lane of its own, test-cluster-gpu-2, and the literal Blacksmith runner is removed. A full run asks for 15 macOS jobs. The approval already names test-cluster-gpu-2, so shard 2 ran on a Darkbloom Sandbox in this PR's first run.

Shard 2 memory, by selection

Used = app + wired + compressed, from scripts/ci-resource-sampler.py. Process = the largest swiftpm-testing-helper lifetime footprint during the selection. Before: run 42917194201 (Blacksmith, 12 vCPU / 48 GiB, 6.15 GiB used before the tests). After: run 42924487818 (Darkbloom, 12 vCPU / 32 GiB, 6.50 GiB used before the tests).

Selection Seconds before / after Used peak before / after (GiB) Process before / after (GiB)
qwen-tp-mtp-gpu-wide-kernel 14 / 19 6.92 / 12.39 0.88 / 4.87
qwen-tp-aqv-gpu-fused-kernels 6 / 6 6.46 / 12.39 0.88 / 4.87
qwen-tp-batch-gpu-paged-transient 32 / 31 6.93 / 7.92 0.88 / 0.34
glm53-depth-invariance-widths 33 / 31 17.24 / 17.42 10.48 / 10.23
glm53-window-width-census 159 / 203 15.53 / 16.10 8.74 / 8.74
paged-verify-bench 40 / 33 40.99 / 10.74 34.26 / 3.75
qwen-tp-aqv-bench 18 / 15 11.13 / 8.79 1.44 / 1.45
qwen-tp-wide-bench 9 / 8 7.12 / 7.58 0.88 / 0.25
prefix-record-encode-bench 54 / 47 7.02 / 7.86 0.88 / 0.33

The first two rows share one 5-second sample window in the after run, so their used figures are the same sample. The bench's own lines in the after run: peak_active_gib 2.78 (paged) and 2.43 (contiguous), cache_gib 1.02 to 1.05. Its prefill (6.4 to 6.7 s) and window (8.1 to 8.3 ms paged, 3.7 ms contiguous) timings are in the same range as before, on a different Mac.

Shard 2 peak: 40.99 GiB before, 17.42 GiB after. 1.25 × 17.42 = 21.8 GiB, which fits 4x24. The shard took 427 s against 396 and 439 s in two earlier Blacksmith runs, and is still the shortest of the 3 GPU shards (shard 1: 562 s, shard 3: 504 s), so the GPU job's wall time does not change.

Each selection runs in a process of its own, one at a time (scripts/cluster-test-plan.py: no group, --no-parallel). So the peak is one process, not tests that overlap. The same 6 selections fail before and after (qwen-tp-mtp-gpu-wide-kernel, qwen-tp-aqv-gpu-fused-kernels, qwen-tp-batch-gpu-paged-transient, both GLM-5.3 selections, qwen-tp-wide-bench). They are the switched tests that these runners cannot pass. The step continues on error, as before.

Run 42901986173 gave the same figures (41.36 and 34.26 for the bench). The selections run one at a time (scripts/cluster-test-plan.py: no group, --no-parallel), so the peak is one process, not tests that overlap.

After the bound, the largest selection is glm53-depth-invariance-widths. That test builds the synthetic GLM-5.3 stage at real widths (5 layers, hidden 4096, 16 experts) to prove width-invariant decode. The widths are what it proves, so it is not shrunk.

Shard 3's fallback

The plane answers lane_not_enabled for test-cluster-gpu-3 in every run that asked: 8 of 8 pull-request runs on 2026-11-10 (42917194201, 42917346660, 42917455362, 42918120853, 42918933020, 42919883851, 42920581124, 42921144106). The approval's lanes lists test-cluster-gpu-1 but not test-cluster-gpu-3. In the same runs, test-cluster-gpu-1 was granted 5 times and got no_capacity 3 times. Dispatched runs get event_not_admitted for both. This is plane-side: d-inference cannot change it.

Operator step

Add test-cluster-gpu-3 to the Layr-Labs/d-inference approval's lanes. Until then shard 3 keeps blacksmith-12vcpu-macos-27. test-cluster-gpu-2 is already listed. No new signed size is needed.

Validation

  • Run 42924487818 (head eef9b84): every job passed. The 9 blocking test jobs, both build jobs, Cluster Release Build Checks, Check the CI plans and the Provider Tests gate passed. GPU shards: shard 1 on darkbloom-16b0e686-… (14.45 GiB used), shard 2 on darkbloom-d2795cba-… (17.42 GiB used), shard 3 on blacksmith-12vcpu-macos-27-3hg3wty3m64khntf (lane_not_enabled; 13.86 GiB used).
  • Run 42932033843 (head d77fc26, docs and one workflow comment changed): every job passed again. GPU shard 2 on darkbloom-183c5779-… (32 GiB Mac), 16.93 GiB used, paged-verify-bench process 3.73 GiB; shard 1 on darkbloom-7f6f99ff-…; shard 3 on blacksmith-12vcpu-macos-27-fv2xf6rvemlezd6v (lane_not_enabled).
  • Not run on the laptop (no builds or tests there).

Hooked up

  • provider-plan.yml lane table: test-cluster-gpu-2 ... 4x24, between shards 1 and 3, so the DARKBLOOM_MACOS_LANES cap drops the GPU lanes last-first.
  • provider-tests.yml test-cluster-gpu: every shard reads fromJSON(inputs.routes)[format('test-cluster-gpu-{0}', matrix.shard)].
  • scripts/test-darkbloom-route.py: PLAN_LANES, UNSIZED_PLAN_REQUEST, the cap cases and the 15-job count; LITERAL_SHARD removed.
  • scripts/test-cluster-test-plan.py: every GPU shard has a route lane.
  • Docs: docs/developer/build.md (CI runner routing, Build Once, Job sizes), docs/developer/test.md. Changelog: changelog.d/ci-gpu-shards-darkbloom.md, updated in place.

Diagrams

No Mermaid diagrams, on David's instruction for this PR.

Refactor pass

A separate subagent reviewed the diff. It found one stale doc line (the routed-jobs table in build.md still said shard 2 was not routed), one comment that repeated the lane rule in provider-plan.yml, and two doc lines that left out the GPU shards. All four are fixed in 1c61e3b. It found no behavior change, no weakened assertion, and no remaining LITERAL_SHARD use.

🤖 Generated with Claude Code

… buffer cache

GPU shard 2 peaked at 40.99 GiB used (run 42917194201), 34.26 GiB of it in
the one process of paged-verify-bench. That bench holds 0.5 GiB of K/V, but
MLX's freed-buffer cache (default limit: MLX's memory limit) kept every
prompt chunk's attention temporaries, which grow with the history and so are
never reused. The bench now bounds the cache to a ready Qwen tensor-parallel
rank's freed-buffer cache (1 GiB) and prints its peak active memory and cache
size per run.

With that, shard 2 fits 4x24 like shards 1 and 3, so it gets a lane of its
own (test-cluster-gpu-2) and the literal Blacksmith runner goes. A full run
asks for 15 macOS jobs. The lane routes once the operator adds it to the
approval's lanes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference-landing Ready Ready Preview Nov 11, 2026 12:33am UTC
darkbloom-status Ready Ready Preview Nov 11, 2026 12:33am UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 11, 2026 12:33am UTC

Request Review

davidtai and others added 2 commits November 10, 2026 17:36
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@davidtai
davidtai merged commit 732904f into dev Nov 11, 2026
26 checks passed
jonathan308 added a commit that referenced this pull request Nov 11, 2026
davidtai added a commit that referenced this pull request Nov 11, 2026
…1981, #1986, #1987, #1988, #1990); supersedes #1960 (#2000)

* ci: port #1951 to master (route the build lanes while job sizes are off)

Cherry-pick of dev's merge 2474f3d (-m 1). changelog.d/ci-macos-job-sizes.md
was consumed into CHANGELOG.md on master by #1938, so this commit adds
changelog.d/ci-build-lanes-routed.md instead, as #1960 did. The tree of this
commit equals #1960's head 429d1bf; this PR supersedes #1960.

(cherry picked from commit 2474f3d)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: port #1955 to master (GPU shards ask Darkbloom first)

Cherry-pick of dev's merge 086dd06 (-m 1).

(cherry picked from commit 086dd06)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: port #1986 to master (route desktop-package)

Cherry-pick of dev's merge 2588e7f (-m 1).

(cherry picked from commit 2588e7f)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: port #1981 to master (no GitHub Actions cache on a Darkbloom runner without the Darkbloom cache)

Cherry-pick of dev's merge 723ce1d (-m 1). docs/operations/provider-release.md
conflicted only on its "Last updated" line; it takes 2026-11-10. This PR
supersedes #1982.

(cherry picked from commit 723ce1d)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: port #1990 to master (gate desktop-package's npm cache)

Cherry-pick of dev's merge 844b76d (-m 1).

(cherry picked from commit 844b76d)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: port #1987 to master (GPU shard 2 memory)

Cherry-pick of dev's merge 732904f (-m 1). docs/developer/test.md
conflicted only on its "Last updated" line; it takes 2026-11-10.

(cherry picked from commit 732904f)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: port #1988 to master (right-size jobs; BoundedBufferCache)

Cherry-pick of dev's merge 420a512 (-m 1).

(cherry picked from commit 420a512)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Gajesh Naik <26431906+Gajesh2007@users.noreply.github.com>

This branch was successfully deployed

3 active deployments
Preview – eigen-homepages-darkbloom — d77fc26f Deployed Nov 11, 2026 by vercel[bot]
Preview – d-inference-landing — d77fc26f Deployed Nov 11, 2026 by vercel[bot]
Preview – darkbloom-status — d77fc26f Deployed Nov 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant